<template>
  <div>
    <el-form :model="queryParams" ref="queryForm" size="medium" :inline="true" label-width="60px">
      <el-form-item label="查询栏" prop="levelNum">
        <el-input v-model="queryParams.levelNum" placeholder="请输入标准编号" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="" prop="levelName">
        <el-input v-model="queryParams.levelName" placeholder="请输入标准名称" clearable @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="medium" @click="() => $emit('handleQuery', queryParams)">
          搜索
        </el-button>
        <el-button icon="el-icon-refresh" size="medium" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'manage',
  data () {
    return {
      // 查询参数
      queryParams: {
        levelNum: undefined,
        levelName: undefined,
      },
    }
  },
  methods: {
    resetQuery () {
      for (const key in this.queryParams) {
        this.queryParams[key] = null
      }
    }
  }
}
</script>

<style>
</style>